module.exports=(ids=['id'])=>async (ctx,next)=>{
    for(var id of ids){
        let val=ctx.query[id];
        if(!val || !/^[a-zA-Z0-9]{24}$/.test(val)){
            ctx.flash={error:`${id}格式错误`};
            return ctx.redirect('back');
        }
    }
    await next();
};